package com.xiaoxing.zhinenghuacangku_liaocheng.mvp.contract;

import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;
import com.xiaoxing.zhinenghuacangku_liaocheng.mvp.model.entity.GetUserSpaceListForAutoStore;
import com.xiaoxing.zhinenghuacangku_liaocheng.mvp.ui.entity.RuKuQingZhang;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;

public interface LiaoCheng_RuKuQingZhangContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {
        void getRuKuQingZhangDataSuccess(RuKuQingZhang entityData);

        void callAgvGetMaterialToInstoreBufferSuccess(String entityData);

        void checkCanReInstoreSuccess(String entityData);

        void instoreAgainSuccess(String entityData);

        void getUserSpaceListForAutoStoreSuccess(List<GetUserSpaceListForAutoStore> getUserSpaceListForAutoStoreList);//获取空闲仓位

        void addAgvTaskSuccess(String addAgvTask);//入库操作

        void setInstoreBufferReadyForAGVSuccess(String setInstoreBufferReadyForAGV);//入库 扫描入库缓冲位二维码

    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {
        Observable<RuKuQingZhang> getRuKuQingZhangData(Map<String, String> map);

        Observable<String> callAgvGetMaterialToInstoreBuffer(String mid);

        Observable<String> checkCanReInstore(String mid);

        Observable<String> instoreAgain(String mid);

        Observable<String> getUserSpaceListForAutoStore(
                String user_id,
                String spname
        );

        Observable<String> addAgvTask(
                String mid, String instoreBufferId, String spid, String num, String uid, String remark
        );

        Observable<String> setInstoreBufferReadyForAGV(
                String bufferId,
                String spid
        );

    }
}
